﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace RedBit.OAuthLibrary.Twitter
{
    public class TwitterOAuth
    {
        //url to get the request token
        public string RequestTokenUrl { get { return string.Format("https://api.twitter.com/oauth/request_token?oauth_callback=oob", CallbackUrl); } }

        //url to get the access token
        public string AccessTokenUrl { get { return string.Format("https://api.twitter.com/oauth/access_token?oauth_verifier={0}", Verifier); } }

        //url for user to authenticate with twitter
        public string AuthenticationUrl { get { return string.Format("http://api.twitter.com/oauth/authorize?oauth_token={0}", Token); } }
        public string CallbackUrl { get { return "http://localhost/WP7HtmlPages/TwitterMobileClientCallback.htm"; } }

        //url to verify the credentials of the user
        public string VerifyCredentialsUrl { get { return "http://api.twitter.com/1/account/verify_credentials.xml"; } }

        //url to Search
        public string SearchUrl { get { return "http://search.twitter.com/search.atom?q=&ands={0}&lang=all&from={1}&within=15&units=mi&rpp=15"; } }

        //url to show user_timeline
        public string UserTimeLine { get { return "http://api.twitter.com/1/statuses/user_timeline.xml?screen_name={0}"; } }

        //url to update twitter status
        public string StatusUpdateUrl { get { return "http://api.twitter.com/1/statuses/update.xml?status={0}"; } }

        //url to show Friend Time line
        public string FreindTimeLineUrl { get { return "http://api.twitter.com/1/statuses/friends_timeline.xml"; } }

        //url to show Friend Follwing
        public string FriendFollwingUrl { get { return "http://api.twitter.com/1/statuses/followers/{0}.xml"; } }

        //url to show Mention Time line
        public string MentionTimeLineUrl { get { return "http://api.twitter.com/1/statuses/mentions.xml"; } }

        //url to sent direct message
        public string SentDirectMessage { get { return "http://api.twitter.com/1/direct_messages/new.xml?user_id={0}&text={1}"; } }

        //url to show direct recive
        public string DirectRecive { get { return "http://api.twitter.com/1/direct_messages.xml"; } }

        //url to show favorite
        public string FavoriteUrl { get { return "http://api.twitter.com/1/favorites/{0}.xml"; } }

        //url to add favorite
        public string AddFavoriteUrl { get { return "http://api.twitter.com/1/favorites/create/{0}.xml"; } }

        //url to Block
        public string BlockIDUrl { get { return "http://api.twitter.com/1/blocks/create.xml?user_id={0}"; } }

        public bool facebookLogin { get; set; }

        //key and secret when app is registered
        public string ConsumerKey { get; set; }
        public string ConsumerSecret { get; set; }

        //received after the token has been requested
        public string Token { get; set; }
        public string TokenSecret { get; set; }

        // Received after the user has logged in
        public string Verifier { get; set; }

        //these valuse are set once the OAuth process is complete
        public string UserId { get; set; }
        public string ScreenName { get; set; }

        public bool tweetlogin { get; set; }
    }
}
